/*
 * UserTank.h
 *
 *  Created on: Nov 11, 2011
 *      Author: gonzalo
 */

#ifndef USERTANK_H_
#define USERTANK_H_

#include "../../SDLtoolkit/widgets/PlayScenarioPanel.h"
#include "../DTOCliente.h"
#include "../../SDLtoolkit/widgets/Tank.h"
#include "../../SDLtoolkit/SDLEngine.h"

class UsersTanks {
public:
	UsersTanks(std::string owner,SDLEngine* engine);

	void handleUserMessage(DTOCliente* nuevoCliente);

	virtual ~UsersTanks();

	DTO* getLocalTankDTO(std::string clienteId);

protected:
	std::string owner;
	SDLEngine* engine;

	std::list<Tank*> tanks;
private:
	Tank* getTank(std::string owner);

	void handleConnect(DTOCliente* nuevoCliente);
	void handleDisconnect(DTOCliente* removeClient);
	void handleRefresh(DTOCliente* updateClient);
};

#endif /* USERTANK_H_ */
